﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LY.Entity;
using LY.Entity.Entities;
using LY.Entity.PageSearch;
using LY.Entity.SearchEntity;


namespace LY.Interface
{
    /// <summary>
    /// 
    /// </summary>
    public interface IDictService
    {
        #region 字典
        /// <summary>
        /// 获取字典列表
        /// </summary>
        /// <returns></returns>
        List<S_DictDir> GetDictDirList();

        /// <summary>
        /// 字典可分页列表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="view"></param>
        /// <returns></returns>
        PagedList<S_DictDir> QueryDictDirList(DictDirSearch search, PageView view);

        /// <summary>
        /// 字典实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        S_DictDir GetDictDir(int? id);

        /// <summary>
        /// 保存字典
        /// </summary>
        /// <param name="dictdir"></param>
        /// <returns></returns>
        int SaveDictDir(S_DictDir dictdir);

        /// <summary>
        /// 删除字典
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteDictDir(int? id);
        #endregion

        #region 字典项
        /// <summary>
        /// 获取字典项列表
        /// </summary>
        /// <returns></returns>
        List<S_DictItem> GetDictItemList();

        /// <summary>
        /// 字典项可分页列表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="view"></param>
        /// <returns></returns>
        PagedList<S_DictItem> QueryDictItemList(DictItemSearch search, PageView view);

        /// <summary>
        /// 字典项实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        S_DictItem GetDictItem(int? id);

        /// <summary>
        /// 保存字典项
        /// </summary>
        /// <param name="dictitem"></param>
        /// <returns></returns>
        int SaveDictItem(S_DictItem dictitem);

        /// <summary>
        /// 删除字典项
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteDictItem(int? id);
        #endregion
    }
}
